package com.cskaoyan.config;

import com.cskaoyan.interceptor.LogInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MvcConfiguration implements WebMvcConfigurer {
    /**
     * Handler方法拦截器配置
     * 按需要增量注册
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //管理员操作日志记录拦截器
//        registry.addInterceptor(new LogInterceptor()).addPathPatterns("/**");//功能被LogAspect取代，后面按需要继续注册
    }
}
